<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>
<%@page import="com.cqeec.myblog.model.DataDictionary" %>
<!DOCTYPE html>
<html>
<head>
<%@ include file="include/resources.jsp"%>

<!-- ueditor配置文件 -->
<script type="text/javascript"
	src="<%=contentPath%>/lib/ueditor/1.4.3.3/ueditor.config.js"></script>
<!-- ueditor编辑器 -->
<script type="text/javascript"
	src="<%=contentPath%>/lib/ueditor/1.4.3.3/ueditor.all.min.js"></script>

<title>创建文章——我的博客</title>
</head>
<body>
	<div class="container-fluid">
		<%@include file="include/header.jsp"%>
	</div>
	<br />
	<div class="container-fluid">
		<div class="row">
			<div class="col-2"></div>
			<div class="col-8">
				<form action="<%=contentPath%>/article/management.html?m=save"
					method="post">
					<div class="form-group">
						<select type="text" class="form-control" name="type">
							<option value="-1">请选择文章分类...</option>
							<%
								Object atObject=request.getAttribute("atList");
								if(atObject!=null){
									List<DataDictionary> atList =(List<DataDictionary>)atObject;
									for(DataDictionary dd:atList){
							%>
							<option value="<%=dd.getId()%>"><%=dd.getName() %></option>
							<%	
									}
								}
							%>
						</select>
					</div>
					<div class="form-group">
						<input type="text" class="form-control text-center" name="title"
							placeholder="文章标题">
					</div>
					<div class="form-group">
						<!-- 加载编辑器的容器 -->
						<script id="articleUEditor" name="content" type="text/plain"></script>
					</div>
					<div class="form-group text-center">
						<button type="submit" class="btn btn-primary">&nbsp;&nbsp;保存&nbsp;&nbsp;</button>
						&nbsp;&nbsp;&nbsp;
						<button type="button" class="btn btn-primary">&nbsp;保存并发布&nbsp;</button>
					</div>
				</form>
			</div>
			<div class="col-2"></div>
		</div>
	</div>
	<script type="text/javascript">
		var ue = UE.getEditor('articleUEditor');
	</script>
</body>
</html>